<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[type]', [1=>__('Type One'), 2=>__('Type Two')])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('method_init')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[method_init]', [1=>__('method_init_one'), 2=>__('method_init_two')])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Method')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[method]', [3=>__('Method One'), 2=>__('Method Two')])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-goods_name" data-rule="required" class="form-control" name="row[goods_name]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Virtual classification')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-cate_ids" class="form-control selectpicker" multiple="true" name="row[cate_ids][]">
                {foreach name="parentList" item="vo"}
                <option data-type="{$vo.type}" value="{$key}" {in name="key" value=""}selected{/in}>{$vo.name}</option>
                {/foreach}
            </select>
            <!--<input id="c-cate_ids" data-source="category/index" data-field="name" data-multiple="true" class="form-control selectpage" name="row[cate_ids]" type="text" value="">-->
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-goods_images" class="form-control" size="50" name="row[goods_images]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-goods_images" class="btn btn-danger faupload" data-input-id="c-goods_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-goods_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-goods_images" class="btn btn-primary fachoose" data-input-id="c-goods_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-goods_images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-goods_images"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_desc')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-goods_desc" class="form-control" name="row[goods_desc]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-goods_number" class="form-control" name="row[goods_number]" type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('is_superposition')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[is_superposition]', [1=>__('is_superposition_one'), 2=>__('is_superposition_two')])}
        </div>
    </div>
    <div class="form-group c-punch_number">
        <label class="control-label col-xs-12 col-sm-2">最小打卡:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-punch_number_min" class="form-control" name="row[punch_number_min]" type="number" value="">
        </div>
    </div>
    <div class="form-group c-punch_number">
        <label class="control-label col-xs-12 col-sm-2">最大打卡:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-punch_number_max" class="form-control" name="row[punch_number_max]" type="number" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">最小排名:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-ranking_range_min" class="form-control" name="row[ranking_range_min]" type="number" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">最大排名:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-ranking_range_max" class="form-control" name="row[ranking_range_max]" type="number" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">文本设置:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-name="row[input_params]" data-template="testtpl">
                <dd>
                    <ins style="margin-left: 30px">文本标题</ins>
                    <ins style="margin-left: 25px">文本框字数限制</ins>
                    <ins style="margin-left: 100px">修改次数</ins>
                    <ins style="margin-left: 80px">修改截至时间</ins>
                </dd>
                <dd>
                    <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a>
                </dd>
                <textarea name="row[input_params]" class="form-control hide" cols="30" rows="5"></textarea>
            </dl>
            <!--定义模板，模板语法使用Art-Template模板语法-->
            <script type="text/html" id="testtpl">
                <dd class="form-inline">
                    <input type="text" name="<%=name%>[<%=index%>][inputNumber]" class="form-control" value="<%=row['inputNumber']%>">
                    <input type="number" name="<%=name%>[<%=index%>][inputLimitTextNumber]" class="form-control" value="<%=row['inputLimitTextNumber']%>">
                    <input type="number" name="<%=name%>[<%=index%>][numbers]" class="form-control" value="<%=row['numbers']%>">
                    <input type="datetime-local" name="<%=name%>[<%=index%>][update_date]" class="form-control" value="<%=row['update_date']%>">
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span> <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                </dd>
            </script>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">商品权重:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weight" class="form-control" name="row[weight]" type="number" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('开始时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-start_date" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_date]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('结束时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-end_date" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_date]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', [1=>__('Status One'), 2=>__('Status Two')])}
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
